package com.ctshk.app.airexpress.controller;

import com.ctshk.common.annotations.OperationLogAnnotation;
import com.ctshk.common.dto.Result;
import com.ctshk.common.enums.OperationLogModel;
import com.ctshk.common.enums.OperationLogType;
import com.ctshk.common.model.AppReq;
import com.ctshk.common.web.support.BaseController;
import com.ctshk.rpc.airexpress.dto.app.AirportExpressCacheDTO;
import com.ctshk.rpc.airexpress.service.IAirportExpressAppService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "机场快线APP服务", tags = "机场快线APP服务")
@RestController
@RequestMapping("/airport/express/customer")
public class AirportExpressAppController extends BaseController {

    @DubboReference
    private IAirportExpressAppService airportExpressAppService;

    @ApiOperation(value = "机场快线APP服务-产品信息", notes = "机场快线APP服务-产品信息")
    @OperationLogAnnotation(operModul = OperationLogModel.TICKET, operType = OperationLogType.QUERY, operTitle = "机场快线APP服务-产品信息", operDesc = "机场快线APP服务-产品信息")
    @PostMapping("/info/{id}")
    public Result<AirportExpressCacheDTO> getInfo(@PathVariable("id") Long id, AppReq appReq) {
        return airportExpressAppService.getInfo(id, appReq);
    }

}